@layout('base')

@section('content')
<h1>Wiki</h1>
<div class="row">
    <div class="span3">
        <h3>{{ Lang::line('wiki::global.latest_entries')->get() }}</h3>
        <ul>
            @foreach ($latestEntries as $latestEntry)
            <li><a href="{{ URL::to_route('entry', array($latestEntry->id)) }}">{{ $latestEntry->title }}</a></li>
            @endforeach
        </ul>
    </div>
    <div class="span3">
        <h3>{{ Lang::line('wiki::global.categories')->get() }}</h3>
        <ul>
            @forelse ($categories as $category)
            <li><a href="{{ URL::to_route('search_category', array($category->id)) }}">{{ $category->category }}</a></li>
            @empty
            {{ Lang::line('wiki::global.no_categories')->get() }}
            @endforelse
        </ul>
    </div>
    <div class="span6">
        <canvas width="460" height="300" id="tagCloud"></canvas>
        <div id="tagList" style="display: none;">
            <ul>
                @foreach ($tags as $tag)
                <li><a href="{{ URL::to_route('search_tag', array($tag->id)) }}">{{ $tag->tag }}</a></li>
                @endforeach
            </ul>
        </div>
    </div>
</div>
@endsection
@section('scripts')
{{ HTML::script('bundles/wiki/js/script.js') }}
@endsection